package com.Dao;

import com.pojo.User;
import org.mybatis.spring.SqlSessionTemplate;

import java.util.List;

public class UserMapperImpl implements UserMapper {
    private SqlSessionTemplate sqlSession;

    public UserMapperImpl() {
    }


    public UserMapperImpl(SqlSessionTemplate sqlSession) {
        this.sqlSession = sqlSession;
    }

    public SqlSessionTemplate getSqlSession() {
        return sqlSession;
    }

    public void setSqlSession(SqlSessionTemplate sqlSession) {
        this.sqlSession = sqlSession;
    }

    public List<User> getAllsUser(){
        return sqlSession.getMapper(UserMapper.class).getAllUser();
    }

    @Override
    public List<User> getAllAddressUser() {
        return null;
    }

    @Override
    public Integer addnewUser(User user) {
        return null;
    }

    @Override
    public List<User> getAllUser() {
        return sqlSession.selectList("com.Dao.UserMapper.getAllUser");
    }
}
